package com.bestcem.xm.award.controller.param.point;

import com.bestcem.xm.common.core.constant.RegTypes;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * 验证码验证请求参数
 *
 * @author hang.li <hang.li@idiaoyan.com>
 * @version v1.0
 * @date 2021/7/9 10:40
 */
@Data
public class CheckSmsCodeParam {

    /**
     * 奖励id
     */
    @NotBlank(message = "奖励id不能为空")
    @Pattern(regexp = RegTypes.OBJECT_ID, message = "奖励id格式错误")
    @JsonProperty("award_id")
    private String awardId;

    /**
     * 请求id
     */
    @NotBlank(message = "请求id不能为空")
    @Pattern(regexp = RegTypes.OBJECT_ID, message = "请求id格式错误")
    @JsonProperty("request_id")
    private String requestId;

    /**
     * 抽奖手机号
     */
    @NotBlank(message = "抽奖手机号不能为空")
    @Pattern(regexp = "(1[3-9][0-9])[0-9]{8}", message = "抽奖手机号格式错误")
    private String phone;

    /**
     * 验证码
     */
    @NotBlank(message = "验证码不能为空")
    @Pattern(regexp = "^\\d{4}$", message = "验证码格式错误")
    private String code;
}
